package com.xmy.aboutexception;
// 异常捕获 try catch finally
public class Demo1 {
    public static void main(String[] args) {
        try {
            int i = 10 / 0;
            System.out.println("i = "+ i);
        } catch (ArithmeticException e) {
            System.out.println("catch exception");
            System.out.println("e.getMessage()" + e.getMessage());
            System.out.println("e.toString()" + e.toString());
            System.out.println("e.printStackTrace");
            e.printStackTrace();
        } finally {
            System.out.println("Here is finally");
        }
    }
}
